package org.budo.support.spring.bean.util;

import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.PropertyValue;

/**
 * @author lmw
 */
public class PropertyValueUtil {
    /**
     * 低版本 MutablePropertyValues 未提供这个方法，高版本已提供
     */
    public static Object get(MutablePropertyValues mutablePropertyValues, String propertyName) {
        PropertyValue pv = mutablePropertyValues.getPropertyValue(propertyName);
        return (pv != null ? pv.getValue() : null);
    }
}